#include "concurrent_player_test.h"
#include <iostream>

int main() {
    std::cout << "=== Integrated Concurrent Player Test ===" << std::endl;
    
    try {
        ConcurrentPlayerTest test;
        
        // Test server setup
        if (!test.setup_server()) {
            std::cout << "Failed to setup server" << std::endl;
            return 1;
        }
        
        std::cout << "Server setup successful" << std::endl;
        
        // Give server time to start
        std::this_thread::sleep_for(std::chrono::milliseconds(1000));
        
        // Test with just 1 player for 1 second
        std::cout << "Running test with 1 player for 1 second..." << std::endl;
        test.run_concurrent_test(1, 1, 1);
        
        std::cout << "Test completed successfully" << std::endl;
        
        test.cleanup();
        
    } catch (const std::exception& e) {
        std::cout << "Test failed with exception: " << e.what() << std::endl;
        return 1;
    }
    
    return 0;
}